package main

import (
	grpc2 "google.golang.org/grpc"
	"short-video/short-video-rpc/consul"
	"short-video/short-video-rpc/grpc"
	"short-video/short-video-rpc/initiate/mysql"
	"short-video/short-video-rpc/initiate/redis"
	"short-video/short-video-rpc/nacos"
	"short-video/short-video-service/appconfig"
	"short-video/short-video-service/internal"
)

func main() {
	appconfig.GetViperConfig()
	nacos.NewNaCoSs()
	consul.ConSul()
	mysql.MysqlInit()
	redis.RedisInit()
	nac := nacos.Config.Grpc
	grpc.RegisterGrpc(nac.Host, nac.Port, func(server *grpc2.Server) {
		internal.VideoRegister(server)
	})
}
